//  @ Project : GagalPanen
//  @ File Name : sprite.hpp
//  @ Date : 3/9/2011
//  @ Author : 
//
//


#if !defined(_SPRITE_H)
#define _SPRITE_H

#include <string>
#include "movingcreature.hpp"
#include "spritetype.hpp"

class Sprite : public MovingCreature {
public:
  // normal constructor
  Sprite(GameInterface* game, int startX, int startY);

  // load game constructor
  Sprite(GameInterface* game, std::ifstream& is);

  virtual void save(std::ofstream& os);

  virtual ~Sprite();

  void advanceDay();
  void advanceTime();
  virtual bool isImportant(Cell* cell) = 0;
  bool isSleep();
  virtual void resetPosition() = 0;
  bool isSteppable();
  virtual SpriteType getType() = 0;
  virtual std::string getViewRep(Direction dir) = 0;
  virtual ActionType getActionType() = 0;
  void wake();
  void sleep();
protected:
  void performSingleAction();
private:
  bool is_sleep_;
};

#endif  //_SPRITE_H
